The present invention relates generally to cache handling in a database system, and more particularly, to creating a cache image based on a value of a cache quality parameter of a given cache meeting a cache image creation criterion.
Database systems and, in particular, relational database systems are used in many different application areas. They belong to the backbone of modern information technology infrastructures including cloud computing environments. Caches and/or buffer pools are an important factor in the performance of databases. In most database systems, the buffer pools are lost once the database system is shutdown (e.g., because of maintenance reasons). Accordingly, after a restart of the database, it takes some time until the buffer pools are being filled again according the workloads. During this time frame, the performance of the database may be decreased significantly. This is because the database system has to read the required database pages from the disk in order to process requests.
Apart from a shutdown and restart scenario, the same problem may exist when the database is backed up and restored. This may, for example, be necessary if another node member has to be added for scalability reasons in a distributed environment.
The size of the buffer pool and the pages accessed mainly determine which database pages are being kept in the buffer pools. Accordingly, in some cases, using a snapshot of a buffer pool is not optimal for a creation of an image because it could be based on workloads that may run in special situations. If, for example, a maintenance workload has been executed that differs from the workload other users execute against the database, it may change the state of the buffer pool substantially. Pages could be pruned from the buffer pool and be replaced by pages that are needed by the maintenance workload only. Restoring such a buffer pool image will not result in optimal performance for the target workload.